package com.budwk.app.miniapp.models;

import com.budwk.starter.common.openapi.annotation.ApiModel;
import com.budwk.starter.common.openapi.annotation.ApiModelProperty;
import lombok.Data;
import org.nutz.dao.entity.annotation.*;

import java.io.Serializable;

/**
 * 行政区划对象 wx_area
 *
 * @author dfxy
 * @date 2023-02-28
 */
@Data
@Table("wx_area")
@ApiModel(description = "行政区划")
public class WxArea implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 区域ID
     */
    @Id
    @Column("id")
    @Comment("区域ID")
    @ApiModelProperty(description = "区域ID")
    @ColDefine(type = ColType.INT, width = 64)
    private Long id;

    /**
     * 上级区域ID
     */
    @Column("parent_id")
    @Comment("上级区域ID")
    @ApiModelProperty(description = "上级区域ID")
    @ColDefine(type = ColType.INT, width = 64)
    private Long parentId;

    /**
     * 行政区域等级 1-省 2-市 3-区县 4-街道镇
     */
    @Column
    @Comment("行政区域等级 1-省 2-市 3-区县 4-街道镇")
    @ApiModelProperty(description = "行政区域等级 1-省 2-市 3-区县 4-街道镇")
    @ColDefine(type = ColType.INT, width = 16)
    private Long level;

    /**
     * 名称
     */
    @Column("name")
    @Comment("名称")
    @ApiModelProperty(description = "名称")
    @ColDefine(type = ColType.VARCHAR, width = 100)
    private String name;

    /**
     * 完整名称
     */
    @Column("whole_name")
    @Comment("完整名称")
    @ApiModelProperty(description = "完整名称")
    @ColDefine(type = ColType.VARCHAR, width = 300)
    private String wholeName;

    /**
     * 本区域经度
     */
    @Column
    @Comment("本区域经度")
    @ApiModelProperty(description = "本区域经度")
    @ColDefine(type = ColType.VARCHAR, width = 20)
    private String lon;

    /**
     * 本区域纬度
     */
    @Column
    @Comment("本区域纬度")
    @ApiModelProperty(description = "本区域纬度")
    @ColDefine(type = ColType.VARCHAR, width = 20)
    private String lat;

    /**
     * 电话区号
     */
    @Column("city_code")
    @Comment("电话区号")
    @ApiModelProperty(description = "电话区号")
    @ColDefine(type = ColType.VARCHAR, width = 10)
    private String cityCode;

    /**
     * 邮政编码
     */
    @Column("zip_code")
    @Comment("邮政编码")
    @ApiModelProperty(description = "邮政编码")
    @ColDefine(type = ColType.CHAR, width = 6)
    private String zipCode;

    /**
     * 行政区划代码
     */
    @Column("area_code")
    @Comment("行政区划代码")
    @ApiModelProperty(description = "行政区划代码")
    @ColDefine(type = ColType.CHAR, width = 10)
    private String areaCode;

    /**
     * 名称全拼
     */
    @Column("pin_yin")
    @Comment("名称全拼")
    @ApiModelProperty(description = "名称全拼")
    @ColDefine(type = ColType.VARCHAR, width = 400)
    private String pinYin;

    /**
     * 首字母简拼
     */
    @Column("simple_py")
    @Comment("首字母简拼")
    @ApiModelProperty(description = "首字母简拼")
    @ColDefine(type = ColType.VARCHAR, width = 200)
    private String simplePy;

    /**
     * 区域名称拼音的第一个字母
     */
    @Column("per_pin_yin")
    @Comment("区域名称拼音的第一个字母")
    @ApiModelProperty(description = "区域名称拼音的第一个字母")
    @ColDefine(type = ColType.CHAR, width = 1)
    private String perPinYin;
}
